package com.hqyj.hrms.modules.attendance.controller;


import com.hqyj.hrms.modules.attendance.entity.Attendance;
import com.hqyj.hrms.modules.attendance.service.AttendanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author rock
 * @since 2021-10-06
 */
@RestController
@RequestMapping("/attendance")
public class AttendanceController {
    @Autowired
    private AttendanceService attendanceService;

    @GetMapping("/add")
    public HashMap<String, Object> add(Attendance attendance) {

        return attendanceService.add(attendance);
    }
    @GetMapping("/update")
    public HashMap<String, Object> update(Attendance attendance) {

        return attendanceService.update(attendance);
    }
    @GetMapping("/del")
    public HashMap<String, Object> del(Integer attId) {

        return attendanceService.del(attId);
    }

    @GetMapping("/list")
    public HashMap<String, Object> list(Attendance attendance) {

        return attendanceService.list(attendance);
    }

    @GetMapping("/monthList")
    public HashMap<String, Object> selectByMonth(String month) {
        return attendanceService.selectByMonth(month);
    }
}

